﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Leafing.Data;
using Microsoft.Reporting.WebForms;

public partial class frmPrintHuizong : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["Status"] != null)
        {
       //    string ReportTitle =  String.Format("{0}年初中招生报名{1}学生汇总表", DateTime.Now.Year, Server.UrlDecode(Request.QueryString["Status"].ToString()));
       //    ReportParameter rp = new ReportParameter("ReportTitle1", ReportTitle);
        //    this.ReportViewer1.LocalReport.SetParameters(new ReportParameter[] { rp });
            this.BmInfoDS1.DefaultOrderBy = "XH";
            this.ReportViewer1.LocalReport.DisplayName = String.Format("{0}年初中招生报名{1}学生汇总表", DateTime.Now.Year, Request.QueryString["Status"]);

            if (Request.QueryString["Status"].ToString() != "全部")
                this.BmInfoDS1.Condition = CK.K["Status"] == Request.QueryString["Status"].ToString();

            if (Request.QueryString["OrderBy"] != null && !String.IsNullOrEmpty(Request.QueryString["OrderBy"].ToString()))
            {
                this.BmInfoDS1.DefaultOrderBy = Request.QueryString["OrderBy"].ToString();
            }
        }
    }
}